package com.ruoyi.web.order;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.order.domain.AfterSaleDetailDTO;
import com.ruoyi.system.order.service.AfterSaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/after-sale")
public class AfterSaleController {

    @Autowired
    private AfterSaleService afterSaleService;

    @Anonymous
    @GetMapping("/detail")
    public AjaxResult getAfterSaleDetail(@RequestParam("orderId") Long orderId) {
        return AjaxResult.success(afterSaleService.getDetailByOrderId(orderId));

    }
}